<?php 
$i=0;
$modelAlias = array_pop(explode('.',$model));
?>
<h3><?php echo __("Comments")?>(<?php echo count($comments)?>)</h3>
<?php
foreach($comments as $comment)
{ 
	if(isset($comment[$modelAlias]))
	{
		$comment = $comment[$modelAlias];
	}	
	$class = null;
	if ($i++ % 2 == 0)
	{
		$class = 'altrow';
	}
?>
<div class="<?php echo $class;?>">
	<?php echo nl2br($comment['body']);?>
<?php
$profileUrl = '/admin/users/view/'.$comment['poster']['id'];
if($comment['poster_entity'] == 'Guest')
{
	$profileUrl = 'javascript::void();';
}?>
	<div class="post_info">
	<?php echo __("Posted by")?> <?php echo $html->link($comment['poster']['display_name'], $profileUrl); ?>
	| <?php echo $time->timeAgoInwords($comment['created'],array('shortString'=>true));?>
	</div>
</div>
<?php } ?>